package com.avic.modules.dictionaries.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * @author zhangzikang 点位字典表
 * @date 2022-08-14
 */
@Data
@TableName("dictionaries")
@NoArgsConstructor
public class Dictionaries implements Serializable {

    @TableId(value="ID", type = IdType.AUTO)
    private Long id;

    // 含义
    private String meaning;

    // 值
    private String value;

    // 排序
    private String sort;

    // 分类
    private Integer classify;

    // 创建时间
    private Timestamp createTime;


    public void copy(Dictionaries source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
